package org.fusionide.editors;

import org.eclipse.jface.text.Document;
import org.fusionide.builder.parsers.IParser;
import org.fusionide.builder.parsers.IParserHandler;
import org.fusionide.builder.parsers.ParserException;
import org.fusionide.builder.parsers.cfml.CFMLParser;



public class XMLDocument extends Document {

	private IParser parser = null;

	public IParser getDocumentParser() {
		if (parser == null)
			parser = new CFMLParser();
		return parser;
	}

	public void parse() {
		IParser parser = getDocumentParser();
		parser.parse(this.get().toCharArray(), new IParserHandler(null) {
			@Override
			public void addMarker(ParserException e) {
			}
		});
	}
}
